import {Meta} from '@storybook/addon-docs/blocks';

<Meta title="Composables/useUrl" />

# useUrl

Simple composable to generate URL either for Page or API url. See examples.

```javascript
import {useApiUrl} from '@/composables/useUrl';

// API url example
const {apiUrl: submissionApiUrl} = useUrl(`submissions/${props.submissionId}`);
// http://domain/index.php/publicknowledge/api/v1/submissions/19

// Page url example
const {pageUrl} = useUrl('dashboard/editorial', {
	currentViewId: 'assigned-to-me',
});
// http://domain/index.php/publicknowledge/en/dashboard/editorial?currentViewId=assigned-to-me
```
